﻿using Admin.Core.Common.BaseModel;
using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace Admin.Core.Model.Admin
{
    [Table(Name = "AD_TENANT")]
    public class TenantEntity: Entity
    {
        /// <summary>
        /// 名称
        /// </summary>
        [Column(StringLength = 50, CanUpdate = false, Name = "NAME")]
        public string Name { get; set; }

        /// <summary>
        /// 版本
        /// </summary>
        [Description("版本")]
        [Column( IsVersion = true, Name = "VERSION")]
        public long Version { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [Description("是否删除")]
        [Column(Name = "ISDELETED")]//
        public bool IsDeleted { get; set; } = false;


        /// <summary>
        /// 启用
        /// </summary>
        [Column(Name = "ENABLED")]
        public bool Enabled { get; set; } = true;

        [Navigate(ManyToMany = typeof(UserTenantEntity))]
        public ICollection<UserEntity> Users { get; set; }

    }
}
